<!-- directive:title Validation -->
<!-- directive:breadcrumb Validation -->
<div class='panel-body'>
    <tabset class="tab-container">
        <tab heading="校验(项目用)全列举">
            <form name="form2" class="form-horizontal form-validation">
                <div class="form-group">
                    <label class="col-sm-3 control-label">Form</label>
                    <div class="col-sm-9"> 
                    <div class="col-sm-9"> <p class="form-control-static">这里列举出了所有的<b>本资料库</b>可用的校验,项目用的请稍作修改</p></div> </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">[文本框][必填]</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请输入内容" name="o01" ng-model="obj2.o01" required >
                        <span class="help-block m-b-none">值 <code> [ form2.o01.$error.required ] [ {{ form2.o01.$error.required?"必填项":"-" }} ] </code></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">[下拉框][必填]</label>
                    <div class="col-sm-9">
                        <select class="form-control m-t" name="o02" ng-model="obj2.o02" required placeholder="请输入内容" >
                            <option value="" disabled selected>Please choose</option>
                            <option value="foo">Foo</option>
                            <option value="bar">Bar</option>
                        </select>
                        <span class="help-block m-b-none">值 <code> [ form2.o02.$error.required ] [ {{ form2.o02.$error.required?"必填项":"-" }} ] </code></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">[复选框][必填]</label>
                    <div class="col-sm-9">
                        <label class="checkbox i-checks"> <input type="checkbox" name="o03" ng-model="obj2.o03" required><i></i> 同意条款 </label>
                        <span class="help-block m-b-none">值 <code> [ form2.o03.$error.required ] [ {{ form2.o03.$error.required?"必填项":"-" }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">[文本框][必填][最小长度]</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请输入内容" name="o04" ng-model="obj2.o04" ng-minlength=5 required>
                        <span class="help-block m-b-none">值 <code> [ form2.o04.$error.required ] [ {{ form2.o04.$error.required?"必填项":"-" }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o04.$error.minlength ] [ {{ form2.o04.$error.minlength?"最小长度5":"-" }} ] </code></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">[文本框][最大长度]</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请输入内容(maxlength)" name="o05" ng-model="obj2.o05" maxlength=5>
                        <span class="help-block m-b-none">值 <code> [ maxlength ]</code></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">[文本框][必填][长度范围]</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="请输入内容" name="o06" ng-model="obj2.o06" ng-minlength="5" maxlength="10" required>
                        <span class="help-block m-b-none">值 <code> [ form2.o06.$error.required ] [ {{ form2.o06.$error.required?"必填项":"-" }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o06.$error.minlength ] [ {{ form2.o06.$error.minlength?"最小长度5":"-" }} ] </code></span>
                    </div>
                </div>











                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Min</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="min = 5" name="o07" ng-model="obj2.o07" ui-validate=" '$value >= 5' ">
                        <span class="help-block m-b-none"><code> name="o07" ng-model="obj2.o07" ui-validate=" '$value &gt;= 5' " </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o07 ] [ {{ obj2.o07 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o07.$error.validator ] [ {{ form2.o07.$error.validator }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Max</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="max = 5" name="o08" ng-model="obj2.o08" ui-validate=" '$value <= 5' ">
                        <span class="help-block m-b-none"><code> name="o08" ng-model="obj2.o08" ui-validate=" '$value &lt;= 5' " </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o08 ] [ {{ obj2.o08 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o08.$error.validator ] [ {{ form2.o08.$error.validator }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Range</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="min = 5 max = 10"
                            name="o09" ng-model="obj2.o09" ui-validate="{ a:'$value >= 5', b:'$value <= 10' }">
                        <span class="help-block m-b-none"><code> name="o09" ng-model="obj2.o09" ui-validate="{ a:'$value >= 5', b:'$value &lt;= 10' }" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o09 ] [ {{ obj2.o09 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o09.$error.a ] [ {{ form2.o09.$error.a }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o09.$error.b ] [ {{ form2.o09.$error.b }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">RegExp</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="hexa color code" name="o10" ng-model="obj2.o10" ng-pattern="/^#(?:[0-9a-fA-F]{3}){1,2}$/">
                        <span class="help-block m-b-none"><code> name="o10" ng-model="obj2.o10" ng-pattern="/^#(?:[0-9a-fA-F]{3}){1,2}$/" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o10 ] [ {{ obj2.o10 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o10.$error.pattern ] [ {{ form2.o10.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Email</label>
                    <div class="col-sm-9">
                        <input type="email" class="form-control" placeholder="email" ng-model="g.a" name="o11" ng-model="obj2.o11" >
                        <span class="help-block m-b-none"><code> name="o11" ng-model="obj2.o11" type="email" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o11 ] [ {{ obj2.o11 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o11.$error.email ] [ {{ form2.o11.$error.email }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Url</label>
                    <div class="col-sm-9">
                        <input type="url" class="form-control" placeholder="http://" name="o12" ng-model="obj2.o12" >
                        <span class="help-block m-b-none"><code> name="o12" ng-model="obj2.o12" type="url" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o12 ] [ {{ obj2.o12 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o12.$error.url ] [ {{ form2.o12.$error.url }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Digits</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="digits" ng-pattern="/^[0-9]+$/" name="o13" ng-model="obj2.o13" >
                        <span class="help-block m-b-none"><code> name="o13" ng-model="obj2.o13" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o13 ] [ {{ obj2.o13 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o13.$error.pattern ] [ {{ form2.o13.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Number</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="number" name="o14" ng-model="obj2.o14" >
                        <span class="help-block m-b-none"><code> name="o14" ng-model="obj2.o14" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o14 ] [ {{ obj2.o14 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o14.$error.number ] [ {{ form2.o14.$error.number }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Date Iso</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="YYYY-MM-DD" name="o15" ng-model="obj2.o15" ng-pattern="/[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])$/" >
                        <span class="help-block m-b-none"><code> name="o15" ng-model="obj2.o15" ng-pattern="/[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])$/" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o15 ] [ {{ obj2.o15 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o15.$error.pattern ] [ {{ form2.o15.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Phone</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="(XXX) XXXX XXX" name="o16" ng-model="obj2.o16" ng-pattern="/\([0-9]{3}\) ([0-9]{4}) ([0-9]{3})$/" >
                        <span class="help-block m-b-none"><code> name="o16" ng-model="obj2.o16" ng-pattern="/\([0-9]{3}\) ([0-9]{4}) ([0-9]{3})$/" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o16 ] [ {{ obj2.o16 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o16.$error.pattern ] [ {{ form2.o16.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Equal To</label>
                    <div class="col-sm-9">
                        <div class="row">
                            <div class="col-sm-6"><input type="text" class="form-control" name="o18" ng-model="obj2.o18" required></div>
                            <div class="col-sm-6"><input type="text" class="form-control" name="o19" ng-model="obj2.o19" ui-validate=" '$value==obj2.o18' " ui-validate-watch=" 'obj2.o18' "></div>
                        </div>
                        <span class="help-block m-b-none"><code> name="o18" ng-model="obj2.o18" required </code></span>
                        <span class="help-block m-b-none"><code> name="o19" ng-model="obj2.o19" ui-validate=" '$value==obj2.o18' " ui-validate-watch=" 'obj2.o18' " </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o19 ] [ {{ obj2.o19 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o19.$error.validator ] [ {{ form2.o19.$error.validator }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Black-list</label>
                    <div class="col-sm-9">
                        <input type="email" class="form-control" placeholder="input 'bad@domain.com'"
                            name="o20" ng-model="obj2.o20" ui-validate="{blacklist : 'notBlackListed($value)' }" required>
                        <span ng-show='forma.email.$error.blacklist'>This e-mail is black-listed!</span>
                        <span class="help-block m-b-none"><code> name="o20" ng-model="obj2.o20" ui-validate="{blacklist : 'notBlackListed($value)' }" required </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o20 ] [ {{ obj2.o20 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o20.$error.email ] [ {{ form2.o20.$error.email }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o20.$error.required ] [ {{ form2.o20.$error.required }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o20.$error.blacklist ] [ {{ form2.o20.$error.blacklist }} ] </code></span>
                    </div>
                </div>
                <button type="submit" class="btn btn-success">Submit</button>
            </form>
        </tab>
    </tabset>
</div>
